{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
    {% load static %}
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <meta name="description" content="Xenon Boostrap Admin Panel"/>
    <meta name="author" content=""/>
    <title>帐号信息-个人中心-玩吧后台管理</title>
    <link rel="stylesheet" href="{% static "assets/css/fonts/linecons/css/linecons.css" %}">
    <link rel="stylesheet" href="{% static "assets/css/fonts/fontawesome/css/font-awesome.min.css" %}">
    <link rel="stylesheet" href="{% static "assets/css/bootstrap.css" %}">
    <link rel="stylesheet" href="{% static "assets/css/xenon-core.css" %}">
    <link rel="stylesheet" href="{% static "assets/css/xenon-forms.css" %}">
    <link rel="stylesheet" href="{% static "assets/css/xenon-components.css" %}">
    <link rel="stylesheet" href="{% static "assets/css/xenon-skins.css" %}">
    <link rel="stylesheet" href="{% static "assets/css/custom.css" %}">
    <link rel="stylesheet" href="{% static "assets/css/style.css" %}">
    <link rel="stylesheet" href="{% static "assets/css/jquery-labelauty.css" %}">
    <link rel="stylesheet" href="{% static "assets/css/multi-select.css" %}">
    <link rel="stylesheet" href="{% static "assets/css/jquery-ui.css" %}">
    <link rel="stylesheet" href="{% static "css/common.css" %}">
    {% block css_section %}{% endblock %}
    {#    <script src="{% static "assets/js/jquery-1.12.4.js" %}" type="text/javascript"></script>#}
    <script src="{% static "assets/js/jquery-1.11.1.min.js" %}" type="text/javascript"></script>
    <script src="{% static "assets/js/jquery.validate.min.js" %}" type="text/javascript"></script>
    <script src="{% static "assets/js/jquery-ui.js" %}" type="text/javascript"></script>
    <script src="{% static "js/validation.js" %}" type="text/javascript"></script>
    <script src="{% static "js/common.js" %}" type="text/javascript"></script>
    {% block top_script_section %}{% endblock %}
</head>
<body class="page-body">
{% block body_section %}
{% endblock %}
<style>
    .error {
        color: red;
    }
</style>
<script type="text/javascript">

    var object_list = [];
    var object_name = 'id';

    function select_multiple_objects(chkbox, name, id) {
        if (chkbox.checked) {
            object_list.push(id);
        } else {
            object_list.splice(object_list.indexOf(id), 1);
        }

        object_name = name;
        alert(object_list);
    }

    function delete_multiple_objects() {
        alert(object_list.length);
        for (var i = 0; i < object_list.length;) {
            var id = object_list[i];
            object_list.splice(i, 1);
            alert(id);
            var data = {};
            data[object_name] = id;

            $.ajax({
                url: "{{ delete_object_url }}",
                data: data,
                dataType: "json",
                async: false,
                success: function (data) {

                },
                error: function () {

                }
            });
        }
        window.location.href = "{{ redirect_url }}";
    }

    {#    $(function () {#}
    {#        $('#id_dlg_change_password').dialog();#}
    {#    });#}
    $(document).ready(function () {
        {#        $("#id_update_password").validate({#}
        {#            rules: {#}
        {#                old_password: {#}
        {#                    required: true,#}
        {#                    minlength: 6#}
        {#                },#}
        {#                new_password: {#}
        {#                    required: true,#}
        {#                    minlength: 6#}
        {#                },#}
        {#                confirm_password: {#}
        {#                    required: true,#}
        {#                    equalTo: '#new_password'#}
        {#                }#}
        {#            },#}
        {#            messages: {#}
        {#                old_password: {#}
        {#                    required: "不能为空",#}
        {#                    minlength: "密码不能低于6位"#}
        {#                },#}
        {#                new_password: {#}
        {#                    required: "不能为空",#}
        {#                    minlength: "密码不能低于6位"#}
        {#                },#}
        {#                confirm_password: {#}
        {#                    required: "",#}
        {#                    equalTo: "密码不一致"#}
        {#                }#}
        {#            },#}
        {#            submitHandler: function (form) {#}
        {#                var old_pwd = form.old_password.value;#}
        {#                var new_pwd = form.new_password.value;#}
        {##}
        {#                $.post("/APKManager/update_password/",#}
        {#                        {#}
        {#                            "old_password": old_pwd,#}
        {#                            "new_password": new_pwd#}
        {#                        },#}
        {#                        function (data) {#}
        {#                            if (data.rltcode == 0) {#}
        {#                                $("#id_dlg_change_password").dialog("close");#}
        {#                            } else {#}
        {#                                var errmsg = '<div><label style="color:red;">' + data.rltmsg + '</label></div>';#}
        {#                                $("#id_content").after(errmsg);#}
        {#                            }#}
        {#                        });#}
        {#            }#}
        {#        });#}

        {#        $("#id_dlg_change_password").dialog({#}
        {#            autoOpen: false,#}
        {#            height: 400,#}
        {#            width: 600,#}
        {#            modal: true,#}
        {#            title: "",#}
        {#            buttons: {#}
        {#                "提交": function () {#}
        {#                    $("#id_update_password").submit();#}
        {#                },#}
        {#                "取消": function () {#}
        {#                    $(this).dialog("close");#}
        {#                }#}
        {#            }#}
        {#        });#}
        {#        $("#id_obj_pwd").click(function () {#}
        {#            $("#id_dlg_change_password").dialog("open");#}
        {#        });#}
    });
</script>

{#<div class="dialog_bg">#}
{#    <div id="id_dlg_change_password" title="更改密码">#}
{#        <form id="id_update_password">#}
{#            <div id="id_content" style="">#}
{#                <ul style="margin:0 auto;display:block;width:320px;height:240px;padding-top: 40px;">#}
{#                    <li>#}
{#                        <div style="margin-top: 20px;">#}
{#                            <label>旧密码:&nbsp;&nbsp;&nbsp;&nbsp;</label>#}
{#                            <input type="password"#}
{#                                   id="old_password"#}
{#                                   name="old_password"#}
{#                                   maxlength="50"#}
{#                                   style="margin-left: 30px;"/>#}
{#                        </div>#}
{#                    </li>#}
{#                    <li>#}
{#                        <div style="margin-top: 20px;">#}
{#                            <label>新密码:&nbsp;&nbsp;&nbsp;&nbsp;</label>#}
{#                            <input type="password"#}
{#                                   id="new_password"#}
{#                                   name="new_password"#}
{#                                   maxlength="50"#}
{#                                   style="margin-left: 30px;"/>#}
{#                        </div>#}
{#                    </li>#}
{#                    <li>#}
{#                        <div style="margin-top: 20px;">#}
{#                            <label>确认密码:</label>#}
{#                            <input type="password"#}
{#                                   id="confirm_password"#}
{#                                   name="confirm_password"#}
{#                                   maxlength="50"#}
{#                                   style="margin-left: 30px;"/>#}
{#                        </div>#}
{#                    </li>#}
{#                </ul>#}
{#            </div>#}
{#        </form>#}
{#    </div>#}
{#</div>#}

<div class="page-container">
    <div class="sidebar-menu toggle-others fixed my_sidebar-menu">
        <div class="sidebar-menu-inner">
            <header class="logo-env">
                <div class="logo">
                    <a href="dashboard-1.html" class="logo-expanded">
                        <img src="{% static "assets/images/my_logo_b.png" %}" width="170" alt=""/>
                    </a>
                    <a href="dashboard-1.html" class="logo-collapsed">
                        <img src="{% static "assets/images/my_logo_s.png" %}" width="40" alt=""/>
                    </a>
                </div>
            </header>
            <ul id="main-menu" class="main-menu">
                {% for menu_item in menus %}
                    {% if menu_item.selected %}
                        <li class="active opened active">
                            {% else %}
                        <li>
                    {% endif %}
                <a href="{{ menu_item.url }}">
                    <i class="linecons-cog"></i>
                    <span class="title">{{ menu_item.title }}</span>
                </a>
                {% if menu_item.sub_menus %}
                    <ul>
                        {% for subm in menu_item.sub_menus %}
                            {% if subm.selected %}
                                <li class="active">
                                    {% else %}
                                <li>
                            {% endif %}
                        <a href="{{ subm.url }}">
                            <span class="title">{{ subm.title }}</span>
                        </a>
                        </li>
                        {% endfor %}
                    </ul>
                {% endif %}
                </li>
                {% endfor %}


            </ul>
        </div>
    </div>
    <div class="main-content">
        <!-- User Info, Notifications and Menu Bar -->
        <nav class="navbar user-info-navbar" role="navigation" id="id_navbar">
            <!-- Left links for user info navbar -->
            <ul class="user-info-menu left-links list-inline list-unstyled"
                style=" zoom:1; overflow:hidden;">
                <li class="hidden-sm hidden-xs">
                    <p>
                        <i class="fa-bars"> 后台管理系统</i>
                    </p>
                </li>
            </ul>
            <!-- Right links for user info navbar -->
            <ul class="user-info-menu right-links list-inline list-unstyled">
                <li class="dropdown user-profile">
                    <a href="#" data-toggle="dropdown"
                       style=" zoom:1; overflow:hidden; height:73px;">
                        <img src="{% static 'assets/images/user-4.png' %}" alt="user-image"
                             class="img-circle img-inline userpic-32" width="28"/>
							<span>
								{{ user.account }}
								<i class="fa-angle-down"></i>
							</span>
                    </a>
                    <ul class="dropdown-menu user-profile-menu list-unstyled">
                        <li>
                            <a id="id_obj_pwd">更改密码</a>
                        </li>
                        <li class="last">
                            <a href="{{ urls.logout }}">
                                <i class="fa-lock"></i>
                                退出
                            </a>
                        </li>
                    </ul>
                </li>
            </ul>
        </nav>
        <div class="page-title">
            <div class="breadcrumb">
                <ol class="breadcrumb bc-1">
                    {% for m in menu %}
                        {% if m.selected %}
                            <li class="active">
                                <a href="{{ m.url }}">{{ m.title }}</a>
                            </li>
                        {% else %}
                            <li><a href="{{ m.url }}">{{ m.title }}</a></li>
                        {% endif %}

                        {% for m in m.sub_menus %}
                            {% if m.selected %}
                                <li class="active">
                                    <a href="{{ m.url }}">{{ m.title }}</a>
                                </li>
                            {% else %}
                                <li>
                                    <a href="{{ m.url }}">{{ m.title }}</a>
                                </li>
                            {% endif %}
                        {% endfor %}

                    {% endfor %}
                </ol>
            </div>
        </div>

        {% block content_section %}{% endblock %}

        <footer class="main-footer sticky footer-type-1">
            <div class="footer-inner">
                <!-- Add your copyright text here -->
                <div class="footer-text">
                    &copy; 2014
                    <strong>优地</strong>
                    技术有限公司
                </div>
                <div class="go-up">
                    <a href="#" rel="go-top">
                        <i class="fa-angle-up"></i>
                    </a>
                </div>
            </div>
        </footer>
    </div>
</div>
<link rel="stylesheet" href="{% static "assets/js/datatables/dataTables.bootstrap.css" %}">
<!-- Bottom Scripts -->
{#<script src="{% static "assets/js/bootstrap.min.js" %}"></script>#}
{#<script src="{% static "assets/js/TweenMax.min.js" %}"></script>#}
{#<script src="{% static "assets/js/resizeable.js" %}"></script>#}
{#<script src="{% static "assets/js/joinable.js" %}"></script>#}
{#<script src="{% static "assets/js/xenon-api.js" %}"></script>#}
{#<script src="{% static "assets/js/xenon-toggles.js" %}"></script>#}
<script src="{% static "assets/js/datatables/js/jquery.dataTables.min.js" %}"></script>
<script src="{% static "assets/js/jquery.multi-select.js" %}" type="text/javascript"></script>

{#<script src="{% static "assets/js/datatables/dataTables.bootstrap.js" %}"></script>#}
{#<script src="{% static "assets/js/datatables/yadcf/jquery.dataTables.yadcf.js" %}"></script>#}
{#<script src="{% static "assets/js/datatables/tabletools/dataTables.tableTools.min.js" %}"></script>#}
{##}
{#<!-- JavaScripts initializations and stuff -->#}
{#<script src="{% static "assets/js/xenon-custom.js" %}"></script>#}
{#<script src="{% static "assets/js/jquery-labelauty.js" %}"></script>#}
{#<script>#}
{#    $(function () {#}
{#        $(':input').labelauty();#}
{#    });#}
{#</script>#}
{% block bottom_script_section %}{% endblock %}
</body>
</html>